import { get, post, remove, put } from '@/server/request'
import { baseApi, baseApp } from '@/server/base'

export const CompletedApi = {
  /**
   * 设置已完成
   * @param params
   * @returns
   */
  postCompleted(params: CompletedParams) {
    return post(`${baseApi}/api/apk/tasks/complete/${params.id}`, params)
  },
  /**
   * 获取完成的工单信息
   * @returns
   */
  getCompleted(time_range: 1 | 0 = 1) {
    return get(`${baseApi}/api/apk/tasks/completed?time_range=${time_range}`)
  }
}

export type CompletedParams = {
  id: string | number
  method: string[]
  method_other: string
  file_id: string[] | number[]
}
